1. Field of the Invention
This invention relates to an image display method wherein to extract a pixel having a value concerning a predetermined lightness value contained in the lightness range with a value concerning the predetermined lightness value as a threshold value in pixels making up an image, a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range are displayed on a display unit in different display colors, thereby enabling inspection of measurement, collation, discrimination, and the like, of a displayed object whose image is picked up, an image processing system for executing the method, and a recording medium recording therein a program for realizing the method.
2. Description of the Related Art
Available is an image display method using binarization processing for picking up an image of an object to be imaged such as an assembly or a part by an image pickup machine using a CCD (charge coupled device), comparing the lightness of each of pixels making up the picked-up image with a predetermined threshold value, and displaying the image on a screen of a display unit such as a liquid crystal monitor in white or black based on the comparison result.
The image display method using binarization processing is capable of extracting and displaying the image to be extracted on which inspection of measurement, collation, discrimination, and the like, is to be performed from the picked-up image of an object to be imaged by adjusting a threshold value; the method can be applied to inspection of the object to be imaged based on processing such as counting the pixels making up the image to be extracted.
The following two types of image display method for displaying an image undergoing binarization processing are available:
In the first image display method, a picked-up image is displayed on a display unit, an extraction area surrounding the extraction object of the image is set, and a lightness range is set with either or both of the upper limit value and the lower limit value allowing the pixels making up the extraction object to be extracted as a threshold value. Each pixel belonging to the extraction area and having the image lightness contained in the lightness range is displayed in white, each pixel belonging to the extraction area and having the image lightness out of the lightness range is displayed in black, and each pixel not belonging to the extraction area is displayed in one color.
In the first image display method, if more than one extraction area is set and the lightness range is set for each extraction area, when a pixel belongs to two or more extraction areas, it is displayed in the display color based on the lightness range set for any one of the extraction areas.
The second image display method is a method of displaying each pixel in white or black based on one lightness range for the whole display image.
However, in the first image display method, the pixel belonging to two or more extraction areas is displayed in the display color based on the lightness range set for any one of the extraction areas, thus more than one extraction result cannot be grasped at a time. In the second image display method, the whole display image is displayed in the display color based on one lightness range, thus more than one lightness range cannot even be set.
Further, in the first image display method, the pixels not belonging to the extraction area are displayed in one color as in the example given below, thus the positional relationship between the whole display image and the image displayed in each extraction area cannot be grapsed clearly.
FIGS. 13 and 14 are schematic views to show a product to be inspected according to the conventional first image display method. In FIG. 13, a rectangular label 90 with xe2x80x9cABCxe2x80x9d printed on the side of a rectangular parallelopiped product 80 is put on the correct position at the center. In FIG. 14, the label 90 is put in the vicinity of the upper end part of the side of the product 80.
If the product: 80 in FIG. 14 is inspected for the label 90 according to the first image display method, binarization processing display is produced only in the extraction area set in the position intended where the lable 90 is to be detected, thus the product 80 cannot be inspected for the lable 90. In addition, in the first image display method, the pixel not belonging to the extraction area is displayed in one color, thus the cause cannot be grapsed objectively as to whether or not the position where the label 90 is put is abnormal, whether or not the position of the object to be detected is abnormal, or whether or not the label itself is abnormal.
Furthermore, in the first image display method, if a pixel belongs to more than one extraction area, which extraction area the pixel is extracted based on the lightness range set for cannot be understood clearly and not at a time.
For example, to set more than one extraction area at the same position on a display image, set a different stepwise lightness range for each of the extraction areas, classify the object to be extracted based on the value concerning the lightness value, and perform various inspections, which lightness range the extracted pixel is contained in cannot be understood clearly and even if change is made to the lightness range to be used for extraction, the pixels contained in the lightness ranges cannot be understood at a time.
It is therefore an object of the invention to provide an image display method wherein a plurality of extraction results can be grasped at a time., an image processing system for executing the method, and a recording medium recording therein a program for realizing the method.
According to a first aspect of the invention, there is provided an image display method wherein to extract in pixels making up an image, a pixel having a value concerning a lightness value of the image contained in a lightness range with a value concerning a predetermined lightness value as a threshold value, a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range are displayed on a display unit in different display colors, the image display method comprising the steps of: setting a plurality of extraction areas to which the pixels to be extracted in the image belong; setting lightness ranges in a one-to-one correspondence with the setup extraction areas, each lightness range for extracting the pixels in the corresponding extraction area; displaying each pixel belonging to one or more extraction areas with the value concerning the lightness value of the image being contained in all lightness ranges set for the extraction areas in a first display color; displaying each pixel belonging to one or more extraction areas with the value concerning the lightness value of the image being out of all lightness ranges set for the extraction areas in a second display color different from the first display color; and displaying each pixel belonging to more than one extraction area with the value concerning the lightness value of the image being contained in any of the lightness ranges set for the extraction areas and out of any of the lightness ranges in a third display color different from the first and second display colors.
According to a second aspect of the invention, there is provided an image display method wherein to extract in pixels making up an image, a pixel having a value concerning a lightness value of the image contained in a lightness range with a value concerning a predetermined lightness value as a threshold value, a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range are displayed on a display unit in different display colors, the image display method comprising the steps of: setting an extraction area to which the pixels to be extracted in the image belong; and displaying each pixel not belonging to the extraction area in a display color of the image.
According to a third aspect of the invention, there is provided an image display method wherein to extract in pixels making up an image, a pixel having a value concerning a lightness value of the image contained in a lightness range with a value concerning a predetermined lightness value as a threshold value, a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range are displayed on a display unit in different display colors, the image display method comprising the steps of: setting a plurality of extraction areas to which the pixels to be extracted in the image belong; setting lightness ranges in a one-to-one correspondence with the setup extraction areas, each lightness range for extracting the pixels in the corresponding extraction area; setting extraction display colors in a one-to-one correspondence with the setup extraction areas, each extraction display color for displaying the pixels extracted in the corresponding extraction area; displaying each pixel belonging to one or more extraction areas with the value concerning the lightness value of the image being contained only in the lightness range set for one of the extraction areas in an extraction display color corresponding to the extraction area; displaying each pixel belonging to one or more extraction areas with the value concerning the lightness value of the image being out of all lightness ranges set for the extraction areas in a non-extraction display color different from all extraction display colors; and displaying each pixel belonging to more than one extraction area with the value concerning the lightness value of the image being contained in the lightness ranges set for two or more of the extraction areas in a common extraction display color different from all extraction display colors and the non-extraction display color.
According to a fourth aspect of the invention, there is provided an image processing system wherein to extract in pixels making up an image, a pixel having a value concerning a lightness value of the image contained in a lightness range with a value concerning a predetermined lightness value as a threshold value, a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range are displayed on a display unit in different display colors, the image processing system comprising: means for accepting setting of a plurality of extraction areas to which the pixels to be extracted in the image belong; means for accepting setting of lightness ranges in a one-to-one correspondence with the setup extraction areas to extract the pixels from the corresponding extraction area; means for displaying each pixel belonging to one or more extraction areas with the value concerning the lightness value of the image being contained in all lightness ranges set for the extraction areas on the display unit in a first display color; means for displaying each pixel belonging to one or more extraction areas with the value concerning the lightness value of the image being out of all lightness ranges set for the extraction areas on the display unit in a second display color different from the first display color; and means for displaying each pixel belonging to more than one extraction area with the value concerning the lightness value of the image being contained in any of the lightness ranges set for the extraction areas and out of any of the lightness ranges on the display unit in a third display color different from the first and second display colors.
According to a fifth aspect of the invention, there is provided an image processing system wherein to extract in pixels making up an image, a pixel having a value concerning a lightness value of the image contained in a lightness range with a value concerning a predetermined lightness value as a threshold value, a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range are displayed on a display unit in different display colors, the image processing system comprising: means for accepting setting of an extraction area to which the pixels to be extracted in the image belong; and means for displaying each pixel not belonging to the extraction area on the display unit in a display color of the image.
According to a sixth aspect of the invention, there is provided an image processing system wherein to extract in pixels making up an image, a pixel having a value concerning a lightness value of the image contained in a lightness range with a value concerning a predetermined lightness value as a threshold value, a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range are displayed on a display unit in different display colors, the image processing system comprising: means for accepting setting of a plurality of extraction areas to which the pixels to be extracted in the image belong; means for accepting setting of lightness ranges in a one-to-one,correspondence with the setup extraction areas to extract the pixels from the corresponding extraction area; means for accepting setting of extraction display colors in a one-to-one correspondence with the setup extraction areas to display the pixels extracted in the corresponding extraction area; means for displaying each pixel belonging to one or more extraction areas with the value concerning the lightness value of the image being contained only in the lightness range set for one of the extraction areas on the display unit in an extraction display color corresponding to the extraction area; means for displaying each pixel belonging to one or more extraction areas with the value concerning the lightness value of the image being out of all lightness ranges set for the extraction areas on the display unit in a non-extraction display color different from all extraction display colors; and means for displaying each pixel belonging to more than one extraction area with the value concerning the lightness value of the image being contained in the lightness ranges set for two or more of the extraction areas on the display unit in a common extraction display color different from all extraction display colors and the non-extraction display color.
According to a seventh aspect of the invention, there is provided an image processing system wherein to extract in pixels making up an image, a pixel having a value concerning a lightness value of the image contained in a lightness range with a value concerning a predetermined lightness value as a threshold value, a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range are displayed on a display unit in different display colors, the image processing system comprising: means for accepting setting of a plurality of extraction areas to which the pixels to be extracted in the image belong; means for accepting setting of lightness ranges in a one-to-one correspondence with the setup extraction areas to extract the pixels from the corresponding extraction area; determination means for determining whether or not a pixel belongs to any extraction area; comparison means, if the determination means determines that the pixel belongs to any extraction area, for comparing the value concerning the lightness value of the image of the pixel with a threshold value of the lightness range corresponding to each extraction area to which the pixel belongs; means for displaying the pixel on the display unit in a first display color if the comparison means determines that the value concerning the lightness value of the image of the pixel is contained in all lightness ranges; means for displaying the pixel on the display unit in a second display color different from the first display color if the comparison means determines that the value concerning the lightness value of the image of the pixel is out of all lightness ranges; and means for displaying the pixel on the display unit in a third display color different from the first and second display colors if the comparison means determines that the value concerning the lightness value of the image of the pixel is contained in any lightness range and is out of any lightness range.
According to an eighth aspect of the invention, there is provided a computer-readable recording medium recording therein a computer program for causing a computer to determine a display color of an image, to extract in pixels making up the image, a pixel having a value concerning a lightness value of the image contained in a lightness range with a value concerning a predetermined lightness value as a threshold value, for displaying a pixel having a value concerning the lightness value of the image contained in the lightness range and a pixel having a value concerning the lightness value out of the lightness range on a display unit in different display colors, the computer program comprising: first program code means for causing the computer to accept setting of a plurality of extraction areas to which the pixels to be extracted in the image belong; second program code means for causing the computer to accept setting of lightness ranges in a one-to-one correspondence with the setup extraction areas to extract the pixels-from the corresponding extraction area; third program code means for causing the computer to determine whether or not a pixel belongs to any extraction area; fourth program code means, if it is determined that the pixel belongs to any extraction area, for causing the computer to compare the value concerning the lightness value of the image of the pixel with a threshold value of the lightness range corresponding to each extraction area to which the pixel belongs; fifth program code means for causing the computer to determine the display color of the pixel to be a first display color if it is determined that the value concerning the lightness value of the image of the pixel is contained in all lightness ranges as a result of comparing the value concerning the lightness value of the image of the pixel with the threshold value of the lightness range corresponding to each extraction area to which the pixel belongs; sixth program code means for causing the computer to determine the display color of the pixel to be a second display color different from the first display color if it is determined that the value concerning the lightness value of the image of the pixel is out of all lightness ranges as a result of comparing the value concerning the lightness value of the image of the pixel with the threshold value of the lightness range corresponding to each extraction area to which the pixel belongs; and seventh program code means for causing the computer to determine the display color of the pixel to be a third display color different from the first and second display colors if it is determined that the value concerning the lightness value of the image of the pixel is contained in any lightness range and is out of any lightness range as a result of comparing the value concerning the lightness value of the image of the pixel with the threshold value of the lightness range corresponding to each extraction area to which the pixel belongs.
In the first, fourth, seventh, and eighth aspects of the invention, in pixels each belonging to a plurality of extraction areas, a pixel having a value concerning the lightness value of the image containing the pixel being contained in any of the lightness ranges set for the extraction areas and being out of any of the lightness ranges is displayed in the third display color different from the first and second display colors.
Thus, for example, if a pixel which belongs to two extraction areas has a value concerning the lightness value of the image containing the pixel contained in the lightness ranges set for the two extraction areas, it is displayed in white; if the pixel has a value concerning the lightness value of the image containing the pixel out of the lightness ranges set for the two extraction areas, it is displayed in black; and if the pixel has a value concerning the lightness value of the image containing the pixel contained in one lightness range and out of the other lightness range, it is displayed in gray, whereby the extraction results in the two extraction areas can be grasped at a time.
In the second and fifth aspects of the invention, each pixel not belonging to any extraction area is displayed in the display color of the image containing the pixel, whereby the positional relationship between the whole display image and the image displayed in the extraction area can be grasped clearly.
In the third and sixth aspects of the invention, each pixel having a value concerning the lightness value of the image containing the pixel contained in the lightness range set for an extraction area is displayed in the extraction display color corresponding to the extraction area, thereby providing the image display method and the image processing system whereby which extraction area a pixel belonging to more than one extraction area is extracted based on the lightness range set for can be understood clearly and at a time.